public class LinkedListTest {

    public static void main(String[] args) {
        List<Integer> list = new LinkedList<>();
        list.add(20);
        list.add(30);
        list.add(40);
        list.add(50);
        Integer remove = list.remove(3);
        System.out.println(remove);
        int i = list.indexOf(30);
        System.out.println(i);
        System.out.println(list);
    }
}
